
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>写给香香的情书</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;500;600&display=swap');
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Noto Serif SC', serif;
            background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 30%, #ff9a9e 60%, #ffecd2 100%);
            background-attachment: fixed;
            min-height: 100vh;
            overflow-x: hidden;
            position: relative;
        }
        
        /* 背景光晕效果 */
        body::before {
            content: '';
            position: fixed;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle at 30% 50%, rgba(255, 182, 193, 0.3) 0%, transparent 50%),
                        radial-gradient(circle at 70% 80%, rgba(255, 192, 203, 0.2) 0%, transparent 50%);
            animation: bgMove 20s ease-in-out infinite;
            pointer-events: none;
        }
        
        @keyframes bgMove {
            0%, 100% { transform: translate(0, 0); }
            50% { transform: translate(50px, 30px); }
        }
        
        /* 飘落的爱心 */
        .floating-hearts {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1;
            overflow: hidden;
        }
        
        .heart {
            position: absolute;
            font-size: 24px;
            opacity: 0;
            animation: float 12s infinite ease-in-out;
            filter: drop-shadow(0 0 3px rgba(255, 105, 180, 0.5));
        }
        
        @keyframes float {
            0% {
                transform: translateY(100vh) translateX(0) rotate(0deg) scale(0.5);
                opacity: 0;
            }
            10% {
                opacity: 0.8;
            }
            50% {
                transform: translateY(50vh) translateX(20px) rotate(180deg) scale(1);
                opacity: 0.6;
            }
            90% {
                opacity: 0.4;
            }
            100% {
                transform: translateY(-10vh) translateX(-20px) rotate(360deg) scale(0.5);
                opacity: 0;
            }
        }
        
        /* 哭泣表情动画 */
        .crying-emojis {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1;
            overflow: hidden;
        }
        
        .crying-emoji {
            position: absolute;
            font-size: 30px;
            opacity: 0;
            animation: cry 10s infinite ease-in-out;
        }
        
        @keyframes cry {
            0% {
                transform: translateY(20vh) translateX(0) rotate(-10deg);
                opacity: 0;
            }
            15% {
                opacity: 0.7;
            }
            50% {
                transform: translateY(60vh) translateX(-30px) rotate(10deg);
                opacity: 0.5;
            }
            85% {
                opacity: 0.3;
            }
            100% {
                transform: translateY(100vh) translateX(-60px) rotate(-10deg);
                opacity: 0;
            }
        }
        
        /* 玫瑰花瓣飘落 */
        .petals {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1;
            overflow: hidden;
        }
        
        .petal {
            position: absolute;
            font-size: 18px;
            opacity: 0;
            animation: petalFall 15s infinite ease-in-out;
        }
        
        @keyframes petalFall {
            0% {
                transform: translateY(-10vh) translateX(0) rotate(0deg);
                opacity: 0;
            }
            10% {
                opacity: 0.6;
            }
            50% {
                transform: translateY(50vh) translateX(50px) rotate(180deg);
                opacity: 0.4;
            }
            100% {
                transform: translateY(110vh) translateX(-50px) rotate(360deg);
                opacity: 0;
            }
        }
        
        .container {
            position: relative;
            z-index: 2;
            max-width: 900px;
            margin: 0 auto;
            padding: 40px 20px;
        }
        
        .letter-box {
            background: rgba(255, 255, 255, 0.97);
            border-radius: 25px;
            padding: 60px 50px;
            box-shadow: 0 25px 80px rgba(212, 88, 124, 0.25), 
                        0 10px 30px rgba(0, 0, 0, 0.1),
                        inset 0 1px 0 rgba(255, 255, 255, 0.8);
            backdrop-filter: blur(15px);
            animation: fadeIn 1.2s ease-out;
            border: 2px solid rgba(255, 182, 193, 0.3);
            position: relative;
            overflow: hidden;
        }
        
        .letter-box::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent 30%, rgba(255, 182, 193, 0.05) 50%, transparent 70%);
            animation: shine 6s infinite;
        }
        
        @keyframes shine {
            0% { transform: translate(-100%, -100%) rotate(45deg); }
            100% { transform: translate(100%, 100%) rotate(45deg); }
        }
        
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(40px) scale(0.95);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }
        
        .photo-container {
            text-align: center;
            margin-bottom: 40px;
            animation: fadeIn 1.8s ease-out;
            position: relative;
            z-index: 1;
        }
        
        .photo-frame {
            display: inline-block;
            padding: 15px;
            background: linear-gradient(135deg, #fff 0%, #ffe6f0 100%);
            border-radius: 15px;
            box-shadow: 0 15px 40px rgba(212, 88, 124, 0.2),
                        0 5px 15px rgba(0, 0, 0, 0.1);
            transform: rotate(-2deg);
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            position: relative;
        }
        
        .photo-frame::before {
            content: '📷';
            position: absolute;
            top: -15px;
            right: -15px;
            font-size: 30px;
            background: white;
            width: 45px;
            height: 45px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
            z-index: 2;
        }
        
        .photo-frame:hover {
            transform: rotate(0deg) scale(1.08);
            box-shadow: 0 20px 50px rgba(212, 88, 124, 0.3),
                        0 8px 20px rgba(0, 0, 0, 0.15);
        }
        
        .photo-frame img {
            max-width: 100%;
            height: auto;
            max-height: 400px;
            border-radius: 8px;
            display: block;
        }
        
        .photo-placeholder {
            width: 400px;
            height: 300px;
            background: linear-gradient(135deg, #ffecd2, #fcb69f, #ff9a9e);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-size: 18px;
            border-radius: 8px;
            flex-direction: column;
            gap: 10px;
        }
        
        h1 {
            text-align: center;
            font-size: 42px;
            background: linear-gradient(135deg, #d4587c 0%, #ff6b9d 50%, #d4587c 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 35px;
            font-weight: 600;
            animation: fadeIn 2.2s ease-out, titleGlow 3s ease-in-out infinite;
            text-shadow: 0 2px 10px rgba(212, 88, 124, 0.2);
            position: relative;
            z-index: 1;
        }
        
        @keyframes titleGlow {
            0%, 100% { filter: drop-shadow(0 0 5px rgba(212, 88, 124, 0.3)); }
            50% { filter: drop-shadow(0 0 15px rgba(212, 88, 124, 0.5)); }
        }
        
        .content {
            line-height: 2.2;
            font-size: 17px;
            color: #333;
            text-align: justify;
            animation: fadeIn 2.8s ease-out;
            position: relative;
            z-index: 1;
        }
        
        .content p {
            margin-bottom: 24px;
            text-indent: 2em;
            transition: all 0.3s ease;
        }
        
        .content p:hover {
            color: #d4587c;
            transform: translateX(5px);
        }
        
        .content strong {
            color: #d4587c;
            font-weight: 600;
        }
        
        .signature {
            text-align: right;
            margin-top: 45px;
            font-size: 16px;
            color: #666;
            font-style: italic;
            position: relative;
            z-index: 1;
        }
        
        .signature::before {
            content: '💕';
            position: absolute;
            left: 0;
            top: 0;
            font-size: 40px;
            opacity: 0.3;
        }
        
        .music-control {
            position: fixed;
            bottom: 30px;
            right: 30px;
            z-index: 100;
            background: linear-gradient(135deg, #d4587c 0%, #ff6b9d 100%);
            border: none;
            width: 65px;
            height: 65px;
            border-radius: 50%;
            color: white;
            font-size: 26px;
            cursor: pointer;
            box-shadow: 0 8px 25px rgba(212, 88, 124, 0.5);
            transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            display: flex;
            align-items: center;
            justify-content: center;
            border: 3px solid rgba(255, 255, 255, 0.5);
        }
        
        .music-control:hover {
            transform: scale(1.15) rotate(10deg);
            box-shadow: 0 12px 35px rgba(212, 88, 124, 0.7);
        }
        
        .music-control:active {
            transform: scale(0.95);
        }
        
        .music-control.playing {
            animation: musicPulse 1.5s infinite;
        }
        
        @keyframes musicPulse {
            0%, 100% {
                box-shadow: 0 8px 25px rgba(212, 88, 124, 0.5);
                transform: scale(1);
            }
            50% {
                box-shadow: 0 8px 35px rgba(212, 88, 124, 0.8), 0 0 30px rgba(255, 105, 180, 0.6);
                transform: scale(1.1);
            }
        }
        
        .divider {
            text-align: center;
            margin: 35px 0;
            font-size: 28px;
            animation: dividerFloat 3s ease-in-out infinite;
            position: relative;
            z-index: 1;
        }
        
        @keyframes dividerFloat {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-5px); }
        }
        
        /* 悔过表情装饰 */
        .sorry-decoration {
            position: fixed;
            bottom: 100px;
            left: 30px;
            font-size: 50px;
            animation: sorryBounce 2s ease-in-out infinite;
            z-index: 50;
            filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
        }
        
        @keyframes sorryBounce {
            0%, 100% { transform: translateY(0) rotate(-5deg); }
            50% { transform: translateY(-10px) rotate(5deg); }
        }
        
        /* 响应式 */
        @media (max-width: 768px) {
            .letter-box {
                padding: 40px 25px;
                border-radius: 20px;
            }
            
            h1 {
                font-size: 32px;
            }
            
            .content {
                font-size: 16px;
                line-height: 2;
            }
            
            .photo-placeholder {
                width: 100%;
                height: 250px;
            }
            
            .music-control {
                width: 55px;
                height: 55px;
                font-size: 22px;
                bottom: 20px;
                right: 20px;
            }
            
            .sorry-decoration {
                font-size: 35px;
                bottom: 80px;
                left: 20px;
            }
        }
    </style>
</head>
<body>
    <!-- 飘落的爱心 -->
    <div class="floating-hearts" id="hearts"></div>
    
    <!-- 哭泣表情 -->
    <div class="crying-emojis" id="cryingEmojis"></div>
    
    <!-- 玫瑰花瓣 -->
    <div class="petals" id="petals"></div>
    
    <!-- 悔过表情装饰 -->
    <div class="sorry-decoration">😢</div>
    
    <!-- 音乐控制按钮 -->
    <button class="music-control" id="musicBtn" onclick="toggleMusic()">
        <span id="musicIcon">🎵</span>
    </button>
    
    <!-- 背景音乐 -->
    <audio id="bgMusic" loop>
        <source src="music.mp3" type="audio/mpeg">
    </audio>
    
    <div class="container">
        <div class="letter-box">
            <!-- 照片位置 -->
            <div class="photo-container">
                <div class="photo-frame">
                    <img src="photo.jpg" alt="我们的合照" id="photoImg" onerror="this.parentElement.innerHTML='<div class=\'photo-placeholder\'>📷<br>合照<br><small style=\'font-size: 14px; opacity: 0.8;\'>将照片命名为 photo.jpg</small></div>'">
                </div>
            </div>
            
            <h1>写给香香的情书 💝</h1>
            
            <div class="content">
                <p>亲爱的香香：</p>
                
                <p>这是一封可能会被已读不回的情书，也是一封迟到很久很久的道歉信。第一次写情书，手指在键盘上游移了很久，我怕写不好，怕说得太多、也怕说得不够，但我更怕你看不见我真心的颤抖与悔意。于是我还是写了，哪怕语句笨拙，哪怕它只能安静地躺在你的消息列表里。</p>
                
                <p>我爱你，从第一次见面起。那天你穿着旗袍，像一幅晨光里的画，颜色不浓，只是轻轻地，便把我眼前的世界染得明亮。我记得那双眼睛里的波光，记得你笑起来时开心的模样。后来一次次在路上奔赴，高铁、长途车、夜风、昏黄的站台灯，一切都因为你有了意义。短暂的相聚总是被时间无情地切开，曾经离别时你眼角的泪，我以为是下一次拥抱的预告，如今才知道，那也是一次次用力忍耐的痕迹。</p>
                
                <p>我承认，我把你给我的珍贵，当成了理所当然。我以为你不会离开，于是开始放纵自己的自大与自我中心。争吵里我也许是证明自己"对"，却忘了你要的可能只是被抱一抱、被听一听。你一次次把台阶摆在我脚边，我却一次次错过，明明看到裂缝在墙上蔓延，却总觉得"明天再修也不迟"。直到有一天，你说你累了。我突然听见心里有什么碎裂的声音，像玻璃杯从桌沿掉下去，还没落地，就已经知道回不去了。</p>
                
                <p>对不起，香香。对不起我把你的温柔当作风平浪静；对不起我用沉默与争辩一次次伤你；对不起我在你需要的时候不在，在你难过的时候不懂，在你不开心的时候没有及时察觉。更对不起的是，我明明知道你是这世上最值得被珍惜的人，却迟迟不肯改变。</p>
                
                <p>谢谢你曾经把我放在心里；谢谢你带我看过那么多微小又明亮的瞬间；谢谢你也愿意为了我们奔波百里；谢谢你一次次选择相信我。是我没配得上这份信任，是我让你越来越累。</p>
                
                <p>我不想再用任何"如果没有你我活不下去"之类的话来绑架你，那既不公平，也不体面。你说你累了，我理解。我知道道歉之后更重要的是改变，是把爱落到每天的细节里，而不是用一两句漂亮话挽回所有。所以，若命运还肯给我一个机会，我想把承诺说得清楚、也做得踏实。你不一定现在就回应，甚至不必回应，哪怕只为让你日后回想时，能想到"他后来真的变好了"，我也愿意。</p>
                
                <div class="divider">❀ ❀ ❀</div>
                
                <p style="text-indent: 0; font-weight: 500; color: #d4587c;">我会做这些具体的改变：</p>
                
                <p><strong>第一</strong>，我会学会倾听，不插话，不抢结论。每天在你想说话的时候留出固定的"我们时间"，不玩手机、不看消息，把你放在唯一的焦点里。你说完，我复述一遍我听到的，确保我真的懂了你的感受，而不是只听到我的立场。</p>
                
                <p><strong>第二</strong>，不再冷战。任何问题当天解决不了，也会约定一个具体的时间再谈，不留下悬而未决的刺。道歉不拐弯，不"但可是"，错了就承认，拥抱先给，情绪先落地。</p>
                
                <p><strong>第三</strong>，我管理好自己的情绪与边界。我会学习情绪管理，把"脾气"换成"能力"，把"我就是这样"换成"我会变更好"。</p>
                
                <p><strong>第四</strong>，我会把爱放在琐碎里：天气转凉提醒你多穿、你害怕的时候握住你的手、你开心的时候第一时间和你一起笑。鲜花不再是节日专属，拥抱不是争吵后的补偿，它们会成为日常。</p>
                
                <p><strong>第五</strong>，我会尊重你的节奏与选择。你的朋友、你的工作、你的爱好，我都会支持。透明我的行程、交代我的计划，不让你猜，不让你等。</p>
                
                <p><strong>第六</strong>，我会把我们当成一个团队。遇到分歧，不再是"你对我错"，而是"问题在我们中间"。我们一起对付问题，而不是彼此对付彼此。</p>
                
                <p><strong>第七</strong>，我会守护你也守护自己，成为一个让你安心依靠的人。把成长当成习惯，而不是一时冲动。就算你终究没有回头，我也会坚持下去。</p>
                
                <div class="divider">❀ ❀ ❀</div>
                
                <p>如果你愿意，再给我一个小小的试用期吧。让我们见见面，你随时可以按下停止键，不需要任何理由。我不会逼你，不会催你，更不会把压力丢给你，把每一句"我会"变成"我已做"。</p>
                
                <p>我知道，最动听的话，永远不如最笨拙的坚持。也知道，再完美的承诺，也抵不过你心中的那份疲惫。只是请你记得：在你最需要拥抱的夜晚，曾经有一个人站在风里，想把自己的铠甲一片片卸下，只为轻轻地抱住你，不再让你受伤。以后也是。</p>
                
                <p>愿你走过风雨，眉眼依旧明亮。愿你不再因为谁而委屈自己，愿你所有温柔都被温柔以待。若有一天，我们还能在某处相遇，我会先笑，轻声叫你一声"香香"，然后把那天没来得及说完的"对不起"和"我爱你"，再说一遍，慢慢地说，认真地说。</p>
                
                <p>情书总是令人有些肉麻，虽然这不像我的性格，但个性？不存在了。你比它重要得多。</p>
                
                <p style="text-align: center; font-style: italic; color: #999; margin-top: 30px;">吾昔遇汝，一见倾心，百念如潮。<br>寒来暑往，情不减，爱相增，<br>若得再续，此心不渝，愿为尔守岁月如年。</p>
                
                <p style="text-align: center; font-style: italic; color: #999;">何时见许兮，慰我彷徨。<br>愿言配德兮，携手相将。<br>不得於飞兮，使我沦亡。</p>
                
                <div class="signature">
                    <p>无比想你，无比惭愧你，也无比深爱你的</p>
                    <p>那个曾经自大、如今愿意磨平棱角、愿意改变的我</p>
                    <p style="margin-top: 20px; font-size: 14px;">{{ YDW / LOVE / LXX → FOREVER }}</p>
                </div>
            </div>
        </div>
    </div>
    
    <script>
        // 生成飘落的爱心
        function createHearts() {
            const heartsContainer = document.getElementById('hearts');
            const heartSymbols = ['❤️', '💕', '💖', '💗', '💓', '💝', '💘', '💞'];
            
            for (let i = 0; i < 20; i++) {
                const heart = document.createElement('div');
                heart.className = 'heart';
                heart.textContent = heartSymbols[Math.floor(Math.random() * heartSymbols.length)];
                heart.style.left = Math.random() * 100 + '%';
                heart.style.animationDelay = Math.random() * 12 + 's';
                heart.style.fontSize = (Math.random() * 15 + 18) + 'px';
                heart.style.animationDuration = (Math.random() * 4 + 10) + 's';
                heartsContainer.appendChild(heart);
            }
        }
        
        // 生成哭泣表情
        function createCryingEmojis() {
            const cryingContainer = document.getElementById('cryingEmojis');
            const cryingSymbols = ['😢', '😭', '🥺', '😔', '💔'];
            
            for (let i = 0; i < 12; i++) {
                const emoji = document.createElement('div');
                emoji.className = 'crying-emoji';
                emoji.textContent = cryingSymbols[Math.floor(Math.random() * cryingSymbols.length)];
                emoji.style.left = Math.random() * 100 + '%';
                emoji.style.animationDelay = Math.random() * 10 + 's';
                emoji.style.fontSize = (Math.random() * 10 + 25) + 'px';
                emoji.style.animationDuration = (Math.random() * 3 + 8) + 's';
                cryingContainer.appendChild(emoji);
            }
        }
        
        // 生成玫瑰花瓣
        function createPetals() {
            const petalsContainer = document.getElementById('petals');
            const petalSymbols = ['🌸', '🌺', '🌹', '🥀', '💐'];
            
            for (let i = 0; i < 15; i++) {
                const petal = document.createElement('div');
                petal.className = 'petal';
                petal.textContent = petalSymbols[Math.floor(Math.random() * petalSymbols.length)];
                petal.style.left = Math.random() * 100 + '%';
                petal.style.animationDelay = Math.random() * 15 + 's';
                petal.style.fontSize = (Math.random() * 8 + 15) + 'px';
                petal.style.animationDuration = (Math.random() * 5 + 12) + 's';
                petalsContainer.appendChild(petal);
            }
        }
        
        // 音乐控制
        let isPlaying = false;
        const music = document.getElementById('bgMusic');
        const musicBtn = document.getElementById('musicBtn');
        const musicIcon = document.getElementById('musicIcon');
        
        function toggleMusic() {
            if (isPlaying) {
                music.pause();
                musicIcon.textContent = '🎵';
                musicBtn.classList.remove('playing');
            } else {
                music.play().catch(e => {
                    console.log('音乐播放失败，请确保已添加音乐文件');
                });
                musicIcon.textContent = '🎶';
                musicBtn.classList.add('playing');
            }
            isPlaying = !isPlaying;
        }
        
        // 页面加载完成后
        window.onload = function() {
            createHearts();
            createCryingEmojis();
            createPetals();
            
            // 尝试自动播放音乐
            setTimeout(() => {
                music.muted = false;
                music.play().then(() => {
                    isPlaying = true;
                    musicIcon.textContent = '🎶';
                    musicBtn.classList.add('playing');
                }).catch(() => {
                    console.log('自动播放被阻止，请手动点击音乐按钮');
                });
            }, 1000);
        };
    </script>
</body>
</html>
